<!--Descriptive page name, messages and instructions-->
<h2><%=h 'New tag' %></h2>

<%= error_messages_for :tag %>

<p><%=h "Once you have created the tag, the attributes that are particular for that tag category will be available for editing" %></p>

<!--/descriptions-->

<!--subnav-->
<!--/subnav-->

<!--main content-->
<%= form_for @tag, :as => :tag, :url => { :action => "create" }  do |f| %>
  <dl>
    <dt><%= f.label :name, 'Name' %></dt>
    <dd><%= f.text_field :name, :size => ArchiveConfig.TAG_MAX %></dd>

    <dt><%= f.label :canonical, 'Canonical' %></dt>
    <dd><%= f.check_box :canonical %></dd>

    <dt><%=h 'Category' %></dt>
    <dd>
      <% if logged_in_as_admin? %>
        <% types = Tag::TYPES  %>
      <% else %>
        <% types = Tag::USER_DEFINED %>
      <% end %>
      <% types.each do |type| %>
        <%= f.radio_button("type", type) %><%= f.label("type_#{type.downcase}", type) %><br/>
      <% end %>
    </dd>
  </dl>

<p class="submit">
<%= f.submit %></p>
<% end %>
<!--/content-->

<!--subnav-->
<!--/subnav-->
